package io.renren.modules.app.dao;

import io.renren.modules.app.entity.ImMomentLikeEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 *
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-05-25 08:44:56
 */
@Mapper
public interface ImMomentLikeDao extends BaseMapper<ImMomentLikeEntity> {

    @Select("SELECT u.user_id id,u.nickname name FROM im_moment_like ml,tb_user u WHERE u.user_id=ml.user_id AND ml.moment_id=#{id}")
    List<ImMomentLikeEntity> selectListByMid(Integer id);
}
